package com.itheima.controller;


import com.itheima.service.TeacherService;

import java.util.Scanner;

public class TeacherController {
    Scanner sc = new Scanner(System.in);
    TeacherService sd = new TeacherService();
    public void startTeacher() {
        while(true){
            System.out.println("------欢迎来到老师管理系统------");
            System.out.println("1.添加老师  2.修改老师  3.删除老师  4.查询  5.退出");
            String next = sc.next();
            switch(next){
                case "1":
                    sd.add();
                    break;
                case "2":
                    sd.insert();
                    break;
                case "3":
                    sd.delete();
                    break;
                case "4":
                    sd.select();
                    break;
                case "5":
                    return;
                default:
                    System.out.println("输入正确的数字");
            }
        }
    }
}
